import { Component } from '@angular/core';

//import { AboutPage } from '../about/about';
import { CourseListPage } from '../mistake/course-list/course-list';
//import { QuestionSetPage } from '../mistake/question-set/question-set';
import { PlanPage } from '../plan/planPage';
import { HomePage } from '../home/home';
import { SourcePage } from '../source/source';
import { StatusPage } from '../status/status';
import {MenuController, NavController} from "ionic-angular";

@Component({
  templateUrl: 'tabs.html'
})
export class TabsPage {

  pages: Array<{ title: string, component: any }>;
  tab1Root = SourcePage;
  tab2Root = CourseListPage;

  constructor(public menu: MenuController,
              public nav: NavController,) {
    //this.loginNewService.changeMenuDisplayed(true);
    this.menu.enable(true);

  }

  openPage(page) {
    // close the menu when clicking a link from the menu
    this.menu.close();
    this.nav.push(page.component);
    // navigate to the new page if it is not the current page
    this.nav.setRoot(page.component);
  }
}
